#ifndef SENDFILE_H
#define SENDFILE_H

#include <QObject>
#include <QTcpSocket>
#include <QFile>
#include <QFileInfo>

class SendFile : public QObject
{
    Q_OBJECT
public:
    explicit SendFile(QTcpSocket* m_tcp, QObject *parent = nullptr);

    void sendFile(QString path);

    void receiveFile();
signals:
    void gameOver();
    void curPercent(int num); // 进度条需要
    void writeOver();
    void recv();

private:
    QTcpSocket* tcp;
};

#endif // SENDFILE_H
